Skip to content

Expose guarded Datalog relation queries#317

Merged
justinjoy merged 1 commit into
mainfrom
datalog-query-api
May 14, 2026
Merged

Expose guarded Datalog relation queries#317
justinjoy merged 1 commit into
mainfrom
datalog-query-api

Conversation

@justinjoy

Copy link
Copy Markdown
Contributor

Summary

  • add a guarded HTTP relation-atom query endpoint for replayed fact graphs
  • expose matching C client and wyctl datalog query support
  • enforce allowlist resolution, tenant/auth checks, row limits, truncation, and invalid program rejection

Validation

  • meson test -C fact-enabled build --print-errorlogs
  • meson test -C default build --print-errorlogs

Expose a bounded relation-atom query path so stored facts can be read through the same guarded daemon, client, and CLI boundary that ingests them.

Constraint: Public surfaces must not expose storage paths, internal relation names, arbitrary programs, or tracker metadata.
Rejected: General Datalog program upload | unsafe without evaluator budgets and reviewable rule packaging.
Rejected: Direct fact-store reads in wyctl | bypasses daemon authorization and audit boundaries.
Confidence: medium
Scope-risk: moderate
Directive: Keep query input as a parsed allowlisted atom until cancellation and recursion budgets exist.
Tested: full fact-enabled test suite; full default test suite
Not-tested: Audit-enabled fact query build; current local fact build has audit disabled.
Co-authored-by: OmX <omx@oh-my-codex.dev>
@justinjoy justinjoy merged commit de93408 into main May 14, 2026
3 checks passed
@justinjoy justinjoy deleted the datalog-query-api branch May 14, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant